import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:wallet_utils/base_router_config.dart';
import 'package:wallet_utils/color.dart';
import 'package:wallet_utils/event_bus_utils.dart';
import 'package:wallet_utils/hopson_cash_ts.dart';
import 'package:wallet_utils/ht_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:wallet_utils/msg_event_utils.dart';
import 'package:wallet_utils/report_widget/click_widget.dart';
import 'package:wallet_utils/text_style.dart';
import 'logic.dart';

class HXHAuditPage extends StatelessWidget {
  final logic = Get.put(HXHAuditLogic());
  final state = Get.find<HXHAuditLogic>().state;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: ColorManager.colorF4F5F6,
      appBar: htCommonAppbar(context, title: ''),
        body: GetBuilder<HXHAuditLogic>(builder: (logic) {
         return Container(
            child: Stack(
              children: [
                Container(
                  width: MediaQuery.of(context).size.width, // 屏幕宽度
                  height: MediaQuery.of(context).size.height, // 屏幕高度
                  child: Image.asset(
                    'images/repayment_bg.png',
                    fit: BoxFit.cover,
                  ),
                ),
                Container(
                  width: MediaQuery.of(context).size.width, // 屏幕宽度
                  height: 400.sp, // 屏幕高度

                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Image.asset('images/hxh_audit_header.png',
                          width: 152.w, height: 94.h),
                      Container(
                        margin: EdgeInsets.only(top: 14.w, left: 156.sp),
                        child: Row(
                          children: [
                            Image.asset('images/hxh_logo.png',
                                width: 20.w, height: 20.h),
                            SizedBox(
                              width: 3.w,
                            ),
                            Text(
                                state.institutionProductName ?? '',
                                style: TextStyleUtils.style000000(
                                    fontSize: 12.sp, fontWeight: Medium)),
                          ],
                        ),
                      ),
                      Container(
                        margin: EdgeInsets.only(top: 14.w),
                        child: Text('额度正在审核中，请耐心等待',
                            style: TextStyleUtils.style000000(
                                fontSize: 16.sp, fontWeight: Medium)),
                      ),
                      Container(
                        margin: EdgeInsets.only(top: 6.w),
                        child: Text(
                            state.auditTime != null?"审核时间 ${state.auditTime} ":'正在审核中',
                            style: TextStyleUtils.style666666(fontSize: 12.sp)),
                      ),
                      ClickWidget(
                        onTap: () {
                          logic.getUserOrder(2);
                        },
                        child: Container(
                          margin: EdgeInsets.only(top: 40.w),
                          width: 115.w,
                          height: 35.w,
                          alignment: const Alignment(0, 0),
                          decoration: BoxDecoration(
                            color: ColorManager.colorD93C3A,
                            //设置四周圆角 角度 这里的角度应该为 父Container height 的一半
                          ),
                          child: Text(
                            '催一下',
                            style: TextStyleUtils.styleFFFFFF(
                                fontSize: 14.sp, fontWeight: FontWeight.bold),
                          ),
                        ),
                      ),
                    ],
                  ),
                ),
              ],
            ),
          );
        }),
    );
  }
}
